{% embed "OpenfennecCoreBundle::layout.html.twig" %}
    {% block title %}{{ "user.action.log_in"|trans }} :: {{ site.name }}{% endblock %}

    {% block notifications %}
        {{ parent() }}
        {% if error %}
            <div class="alert alert-danger alert-dismissable">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                {{ error.message }}
            </div>
        {% endif %}
    {% endblock %}

    {% block content %}
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">{{ "user.action.log_in"|trans }}</h3>
        </div>
        <div class="panel-body">
            <form class="form-horizontal" action="{{ path("openfennec_login_check") }}" method="post">
                <div class="form-group">
                    <label for="username" class="col-lg-2 control-label">{{ "user.label.username"|trans }}</label>
                    <div class="col-lg-10">
                        <input type="text" id="username" class="form-control" name="_username" value="{{ last_username }}">
                    </div>
                </div>
                <div class="form-group">
                    <label for="password" class="col-lg-2 control-label">{{ "user.label.password"|trans }}</label>
                    <div class="col-lg-10">
                        <input type="password" id="password" class="form-control" name="_password">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-lg-offset-2 col-lg-10">
                        <div class="checkbox">
                            <label><input type="checkbox" id="remember_me" name="_remember_me" checked> {{ "user.action.remember_me"|trans }}</label>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-lg-offset-2 col-lg-10">
                        <input type="submit" class="btn btn-default" name="login" value="{{ "user.action.log_in"|trans }}">
                    </div>
                </div>
            </form>
        </div>
    </div>
    {% endblock %}
{% endembed %}